<?xml version='1.0' encoding='UTF-8' ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">

    <f:view contentType="text/html">

        <h:head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
            <link href="#{facesContext.externalContext.requestContextPath}/resources/css/default.css" rel="stylesheet" type="text/css" />
            <link href="#{facesContext.externalContext.requestContextPath}/resources/css/layout.css" rel="stylesheet" type="text/css" />
            <link href="#{facesContext.externalContext.requestContextPath}/resources/img/favicon.ico" rel="shortcut icon" />
            <title>SGCOR</title>
        </h:head>

        <h:body>

            <div id="div-wrapper" class="wrapper">

                <div class="barra-layout"></div>

                <div id="div-menu" class="menu ui-widget-header">
                    <ui:insert name="menu">

                        <h:form id="form-menu" prependId="false">

                            <p:idleMonitor id="monitor" 
                                           timeout="300000"
                                           idleListener="#{loginBean.monitorarSessao}"
                                           update="growl" />

                            <div style="position: relative; float: left; margin-left: 10px;">
                                <p:menubar id="menubar" autoSubmenuDisplay="false" style="border: 0px; height: 20px; width: 300px;">

                                    <p:menuitem value="Home" icon="ui-icon ui-icon-home" url="/home.jsf" />

                                    <p:submenu label="Cadastros" icon="ui-icon ui-icon-note">
                                        <p:menuitem value="Morador" icon="ui-icon ui-icon-person" url="/view/morador/list.jsf" />  
                                        <p:menuitem value="Correspondência" icon="ui-icon ui-icon-mail-closed" url="/view/correspondencia/list.jsf" />  
                                        <p:menuitem value="Usuário" icon="ui-icon ui-icon-key" url="/view/usuario/list.jsf" />  
                                    </p:submenu>

                                </p:menubar>
                            </div>

                            <div style="position: relative; float: right; margin-right: 15px;">

                                <h:outputText value="#{loginBean.usuario.nome}"
                                              style="margin-right: 15px;" />

                                <p:commandButton action="#{loginBean.fazerLogoff()}" 
                                                 image="ui-icon ui-icon-power"
                                                 title="Sair do sistema"/>

                            </div>

                        </h:form>

                    </ui:insert>
                </div>

                <div id="div-content" class="content">
                    <div id="center">
                        <ui:insert name="content">
                            &nbsp;                        
                        </ui:insert>
                    </div>
                </div>

                <div style="clear: both;"></div>

                <div id="div-footer" class="footer ui-widget-header">
                    <div class="barra-layout"></div>
                    <div>
                        <h5>
                            <ui:insert name="footer">
                                Copyright &copy; 2011 - Todos os direitos reservados
                            </ui:insert>                
                        </h5>
                    </div>
                </div>

            </div>

        </h:body>

    </f:view>

</html>